﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TeamBuy.AccessService
{
    public class TeamBuyAdvertisementService : Common.ITeamBuyAdvertisement
    {
        public System.Data.DataTable GetAdByID(int adID)
        {
            return TeamBuy.AccessService.AccessHelper.GetDataSet("select * from S_Advertisement where IsActived=1 and AdID=" + adID);
        }

        public System.Data.DataTable GetAdByPosition(int adPosition, int adNumber)
        {
            return TeamBuy.AccessService.AccessHelper.GetDataSet("select Top " + adNumber + " * from S_Advertisement where IsActived=Yes and AdPosition=" + adPosition);
        }
    }
}
